<template>
  <div class="page-container">
    <div class="p-10 sm:p-20 flex flex-row items-center justify-center">
        <div class="w-4/5 flex flex-row items-center justify-between flex-wrap">
            <img class=" w-80 h-80" src="~/static/images/error-404.gif">
            <div class="text-center">
                <h1 v-if="error.statusCode === 404">抱歉！您访问的页面不存在或已删除</h1>
                <h1 v-else>应用发生错误异常</h1>
                <a-button type="primary" shape="round" size="large" @click="toHome()"> 返回首页 </a-button>
            </div>
        </div>
    </div>
  </div>
</template>

<script>
  export default {
    props: ['error'],
    methods:{
        toHome(){
            this.$router.push({name:''})
        }
    }
  }
</script>